package simple.utils.data.serializers;


import simple.utils.data.Bytes;

import java.io.IOException;

/**
 * Created by rehak on 5/7/14.
 */
public class FloatSerializer implements Serializer<Float> {
    @Override
    public byte[] toBytes(Float aFloat) throws IOException {
        return Bytes.floatToBytes(aFloat);
    }

    @Override
    public Float fromBytes(byte[] data) throws IOException {
        return Bytes.bytesToFloat(data);
    }
}
